<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateWySalesUserInfoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wy_sales_user_info', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->index('user_id')->defalult(0)->comment('用户ID');
            $table->tinyInteger('type')->comment('1.蝴蝶会员 2.一级合伙人 3.二级合伙人');
            $table->integer('referrer_id')->index('referrer_id')->default(0)->comment('上级用户ID（没有则为0）');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wy_sales_user_info');
    }
}
